package light.mvc.model.voter;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import light.mvc.model.base.IdEntity;

@Entity
@Table(name="t_voter")
@DynamicInsert(true)
@DynamicUpdate(true)
public class Tvoter extends IdEntity implements Serializable{
	
	private String title;
	private String content;
	private String type;
	private String candidate;
	private String voter;
	private Date createdate;
	private Date starttime;
	private Date endtime;
	private Long vi_id;
	public String getTitle() {
		return title;
	}
	public String getType() {
		return type;
	}
	public String getCandidate() {
		return candidate;
	}
	public String getVoter() {
		return voter;
	}
	public Date getCreatedate() {
		return createdate;
	}
	public Date getStarttime() {
		return starttime;
	}
	public Date getEndtime() {
		return endtime;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public void setType(String type) {
		this.type = type;
	}
	public void setCandidate(String candidate) {
		this.candidate = candidate;
	}
	public void setVoter(String voter) {
		this.voter = voter;
	}
	public void setCreatedate(Date createdate) {
		this.createdate = createdate;
	}
	public void setStarttime(Date starttime) {
		this.starttime = starttime;
	}
	public void setEndtime(Date endtime) {
		this.endtime = endtime;
	}
	
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	@Transient
	public Long getVi_id() {
		return vi_id;
	}
	@Transient
	public void setVi_id(Long viId) {
		vi_id = viId;
	}
	public Tvoter() {}
	@Override
	public String toString() {
		return "Tvoter [candidate=" + candidate + ", content=" + content
				+ ", createdate=" + createdate + ", endtime=" + endtime
				+ ", starttime=" + starttime + ", title=" + title + ", type="
				+ type + ", voter=" + voter + "]";
	}

}
